
<%@ page language="java" isELIgnored="false"
	contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<meta content="ie=7" http-equiv="x-ua-compatible" />
<meta name="keywords" content="IT人才评测中心" />
<meta name="description" content="" />
<link href="<%=path%>/other/css/loginStyle.css" rel="stylesheet"
	type="text/css" />
<script src="<%=path%>/script/jquery-1.11.2.min.js"></script>
<style type="text/css" media="screen">
* {
	padding: 0px;
	margin: 0px;
}

body {
	background-color: White;
	background: #ECECEC;
	margin: 0px auto;
	font-family: Arial;
}

#page {
	width: 100%;
	margin: 0px;
	overflow: hidden;
	background-color: #ffffff;
}

#page_header {
	width: 100%;
	height: 79px;
}

#page_login {
	width: 100%;
	height: 525px;
	overflow: hidden;
}

#page_content {
	width: 100%;
	height: 400px;
	height: 150px;
	background: #efefef;
	overflow: hidden;
}

#footer {
	width: 100%;
	clear: right;
	font-size: 12px;
	color: #000000;
	height: 30px;
	line-height: 30px;
	text-align: center;
	background-color: #979797;
	vertical-align: middle;
}

.wrap {
	margin: 0 auto;
	width: 100%;
	max-width: 1082px;
	display: block;
}

#page_header .logo {
	float: left;
	width: 100%;
	height: 79px;
	display: block;
	overflow: hidden;
	background: url(/Images/DW/logo-haixin.png) 0 0 no-repeat;
}

.login_banner {
	border: 1px solid #aaa;
	border-width: 1px 0;
	display: block;
	width: 100%;
	height: 525px;
	min-width: 1082px;
	background-position: center 0;
	background-repeat: no-repeat;
}

.login_content {
	font-family: "Microsoft YaHei", 微软雅黑, "Microsoft JhengHei", 华文细黑,
		STHeiti, MingLiu;
	border: 1px solid #ccc;
	width: 260px;
	height: 240px;
	float: right;
	margin-right: 90px;
	margin-top: 70px;
	padding: 30px 40px;
	background: #fff;
}

.login_content h2 {
	font-size: 20px;
	color: #000;
	line-height: 40px;
	font-weight: bold;
}

.login_input {
	width: 260px;
	height: 40px;
	font-size: 20px;
	border: 1px solid #8C99A2;
	margin: 10px 0;
	float: left;
}

.btn_login {
	font-family: "Microsoft YaHei", 微软雅黑, "Microsoft JhengHei", 华文细黑,
		STHeiti, MingLiu;
	width: 260px;
	height: 44px;
	line-height: 44px;
	background-image: url('/Images/DW/nm7.png');
	text-align: center;
	border: 0;
	font-size: 22px;
	color: #fff;
	font-weight: bold;
	margin-top: 20px;
}

#page_content .item_list {
	width: 800px;
	margin: 100px auto;
}

#page_content .item {
	float: left;
	margin: 0px 5px;
	height: 100%;
	width: 190px;
}

#page_content .item .item_icon {
	width: 100%;
	margin-bottom: 14px;
	text-align: center;
}

#page_content .item .item_title {
	text-align: center;
	font-size: 20px;
	color: #000;
	line-height: 40px;
	font-weight: bold;
}

#page_content .item .item_desc {
	text-align: center;
	font-size: 14px;
	color: #a0a0a0;
	line-height: 24px;
}

#txtUserID, #txtPassWord {
	color: #999 !important;
	font-family: "Microsoft YaHei", 微软雅黑, "Microsoft JhengHei", 华文细黑,
		STHeiti, MingLiu;;
}

#txtError {
	width: 199px;
}

.login_content>span { *+
	display: inline-block;
}
</style>

<link rel="shortcut icon" type="image/ico" href="/favicon.ico" />
</head>
<body>
		<form method="post" name="logins"
						 	action="<%=path%>/UserController/loginback.action"  onsubmit="return register();">
		<div id="page">
			<div id="page_header">
				<div class="wrap">
					<img height="70px" class="title_ico"
						src="<%=path%>/images/login/logo.jpg">
				</div>
			</div>
			<div id="page_login">
				<div class="login_banner"
					style="background-image: url('<%=path%>/images/login/background.png')">
					<div class="login_content">
						<p style="font-size: 20px">已有登录账号</p>
						
					        	<div id="error" style="height:30px;"></div> 
					        	
							<input type="text" class="login_input" id="userName"
								name="userName" /> 
								<input type="password" class="login_input"
								id="userPassword" name="userPassword" onchange="tocheckname()"  />
						
							<input type="submit" class="btn_login" 
								value="登&nbsp;&nbsp;录"
								style="background-color: rgb(69, 149, 230);"  />
					     </form>
							
						
					</div>
				</div>
			</div>
		</div>
	</form>
	<script language="JavaScript">
	function register() {

			 	if (logins.userName.value == "") {
					alert('请输入用户姓名/用户名!');
					logins.userName.focus();
					return false;
				}
			 	else if (logins.userPassword.value == "") {
					alert('请输入密码!');
					logins.userPassword.focus();
					return false;
				} 
				
			 
			
					} 
				  
			
		function tocheckname(){
			
			$.ajax({ 
				
				type:"POST", 
				url : "../UserController/loginbackValidate.action", 
				async:false, 
				data:{ 
					   "userName":$("#userName").val(),
					   "userPassword":$("#userPassword").val(),	   
				}, 
		
				success : function(data){ 
					
					var obj = JSON.parse(data);
					if(obj.error_code==200){
						$("#error").after("<span><font fontsize='5' color='red'>"+"输入正确的用户名密码"+"</font></span>");
					}
					else if(obj.error_code==100){{
						 window.location.href="redirect:../UserController/loginback.action";
						}
					}
				}, 
			});
		}	
		
		
		</script>
	
</body>
</html>
